package com.bill.gaty.mfidelity;

 
import com.bill.gaty.mfidelity.activities.CompatibiliteMainActivity;
import com.bill.gaty.mfidelity.activities.GtfMainActivity;
import com.bill.gaty.mfidelity.activities.HistoriqueMainActivity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.Button;

public class MFidelityActivity extends Activity {
private Button 
accueil_gtf_button_historique,
accueil_gtf_button_compatibilite,
accueil_gtf_button_gtf;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.mfidelity);
		accueil_gtf_button_historique=(Button) findViewById(R.id.accueil_gtf_button_historique);
		accueil_gtf_button_compatibilite=(Button) findViewById(R.id.accueil_gtf_button_compatibilite);
		accueil_gtf_button_gtf=(Button) findViewById(R.id.accueil_gtf_button_gtf);
		
		accueil_gtf_button_historique.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent job=new Intent(getApplicationContext(),HistoriqueMainActivity.class);
				startActivity(job);
			}
		});

		accueil_gtf_button_compatibilite.setOnClickListener(new View.OnClickListener() {
	
	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		Intent job=new Intent(getApplicationContext(),CompatibiliteMainActivity.class);
		startActivity(job);
	}
});

		accueil_gtf_button_gtf.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent job=new Intent(getApplicationContext(),GtfMainActivity.class);
				startActivity(job);
			}
		});
//		if (android.os.Build.VERSION.SDK_INT > 9) {
//		    StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
//		    StrictMode.setThreadPolicy(policy);
//		}
//		ActionBar actionBar = getActionBar();
//		 
//		actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
//		actionBar.setDisplayShowTitleEnabled(true);
//
//		Tab tab = actionBar
//				.newTab().setIcon(R.drawable.home_icon)
//				.setText(getResources().getString(R.string.accueil))
//				.setTabListener(
//						new TabListener<AccueilFragment>(this, "accueil_jeu",
//								AccueilFragment.class ));
//		actionBar.addTab(tab);
//
//		tab = actionBar
//				.newTab().setIcon(R.drawable.fidelite_icon)
//				.setText(getResources().getString(R.string.gtf))
//				.setTabListener(
//						new TabListener<GtfFragment>(this,
//								"jeux_de_verite_et_de_fidelite",
//								GtfFragment.class ));
//		actionBar.addTab(tab);
//		tab = actionBar
//				.newTab().setIcon(R.drawable.compatibilite_icon)
//				.setText(getResources().getString(R.string.compatibilite))
//				.setTabListener(
//						new TabListener<CompatibiliteFragment>(this,
//								"test_compatibilite",
//								CompatibiliteFragment.class ));
//		actionBar.addTab(tab);
// 
//		tab = actionBar
//				.newTab().setIcon(R.drawable.historique_home)
//		
//				.setText(getResources().getString(R.string.historique))
//				.setTabListener(
//						new TabListener<HistoriqueFragment>(this,
//								"historiques", HistoriqueFragment.class ));
//		actionBar.addTab(tab);

	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.mfidelity, menu);
		return true;
	}

}
